{template 'weheader'}
{if $reside}
<script src="{MODULE_URL}template/weui/js/city-picker.min.js"></script>
{/if}
    <script>
	$(function(){
     var element = $("div[class='new-comment-content']");
     var temp =  element.text().replace(/\n/g,'<br/>');
     element.html(temp);
});
    </script>
<style>
body{background-color:#fbf9ff;background-image: url({MODULE_URL}template/weui/images/pg/pgbg.jpg);background-position: top center;background-repeat: no-repeat;background-attachment: fixed;background-size: 100% auto;}
.weui-header .weui-header-left,.weui-header .weui-header-right{top: 5px;}
.dayu-header {padding: 25px 0 0;}

.weui_textarea_counter span {font-size:12px;}
.weui_label span{color: #E64340;}
.weui-popup-container{z-index:9999;}
.weui_cell_select .weui_cell_td {padding-left: 1em;}
.weui_cell_select .weui_cell_hd .weui_select {line-height:45px;padding:0 25px 0 5px;color: #555;}

.weui_extra_area {z-index:0;}
.record .weui_cells:first-child {margin-top:30px;}
.record .weui_cells {margin:0;}
.record img{width:1.2rem;height:1.2rem;}

.a_btn{box-sizing: border-box; margin: 0px 5px 0px 0px; padding: 0px; width:68px;vertical-align: middle; line-height: 28px; text-align: center; color:#fff; display: inline-block; background-image: url({MODULE_URL}template/weui/images/pg/top_btn_bg.png); background-attachment: initial; background-size: 68px auto; background-origin: initial; background-clip: initial; background-position: initial; background-repeat: no-repeat;}
.up_border{box-sizing: border-box; margin: 0 auto; padding: 0px; border: 3px solid rgb(255, 255, 255);width: 100%;height:85px; border-radius: 8px; position: relative; z-index: 0;}
.a_border{box-sizing: border-box; margin: 0px; padding: 0px; border-width: 0px 3px 3px 0px; border-right-style: solid; border-bottom-style: solid; border-right-color: rgba(255, 255, 255, 0.498039); border-bottom-color: rgba(255, 255, 255, 0.498039); vertical-align: baseline; -webkit-tap-highlight-color: transparent; outline: none; width: 80%; height: 80px; border-radius: 0.15625rem; position: absolute; right: 10px; top: 15px;}
.weui_input, .weui_select{text-align:left;color:#0d85c6;padding:2px 5px;}
.weui_label{color:#000;}
.weui_cell{width:75%;margin:0 auto;padding: 5px 15px;}
.weui_cell:before {height: 0px;border-top: 0px solid #D9D9D9;}
.weui_input {background-color:#fff;border: 1px solid #0d85c6;}

.upt{padding:0;height:2px;line-height:1px;margin:0;}

.weui-popup-modal {background-color: transparent;}
</style>
    <div class="weui_tab_bd">

<div class="weui_cells_title">
<div class="right">
    <a class="a_btn f12 open-popup" href="javascript:;" data-target="#popup">活动详情</a>
	<a href="{php echo $this->createMobileUrl('mydayu_form', array('weid' => $_W['uniacid'], 'id' => $reid))}" class="a_btn f12">{$mname}</a>
</div>
</div>
<div class="weui_cells_title"><img src="{$activity['thumb']}" class="img-resp center"></div>

	<div id="popup" class="weui-popup-container" style="background-color: rgba(0, 0, 0, 0.6);">
		<div class="weui-popup-modal">
		
		<div style="width:100%;margin:80px auto 0;position: relative;">
		<div style="position:absolute;top:-4rem;"><img src="{MODULE_URL}template/weui/images/pg/xq_top.png" class="img-resp"></div>
		<div style="position:absolute;top:-4rem;right:10px;"><a href="javascript:;" class="close-popup"><img src="{MODULE_URL}template/weui/images/pg/close.png" class="img-resp" style="width:45px;height:45px;"></a></div>
			<section style="width:85%;background-color:#fff;margin:0 auto;padding:2.5rem 0 0 0;">
				{if !empty($activity['agreement'])}<h4 class="ui-page-title f16 tcenter">{$activity['agreement']}</h4>{/if}
				<div class="weui-popup-bd f14">{php echo htmlspecialchars_decode($activity['content'])}</div>
			</section>
			<p class="p"><a href="javascript:;" class="weui_btn bg-blue close-popup">关闭</a></p>
		</div>
		</div>
	</div>
<form action="{php echo $this->createMobileUrl('dayu_form', array('weid' => $_W['uniacid'], 'id' => $reid))}" class="" enctype="multipart/form-data" method="POST" id="form">
<input type="hidden" name="repeat" value="<?php echo md5(sha1(time())); ?>">

{if $activity['paixu']==0}
<div class="weui_cells_form">
    <div class="weui_cell">
        <div class="weui_cell_hd"><label class="weui_label">{$activity['member']}<span>*</span></label></div>
        <div class="weui_cell_bd weui_cell_primary">
            <input class="weui_input" id="member" name="member" type="text" value="{$member['realname']}" placeholder="请输入姓名">
        </div>
    </div>
    <div class="weui_cell">
		<div class="weui_cell_hd"><label class="weui_label">{$activity['phone']}<span>*</span></label></div>
        <div class="weui_cell_bd weui_cell_primary ">
            <input class="weui_input" id="mobile" name="mobile" type="tel" pattern="[0-9]*" value="{$member['mobile']}" placeholder="请输入手机号">
        </div>
    </div>
	{if $activity['smsid']!=0}
    <div class="weui_cell">
		<input type="hidden" id="htel">
		<input type="hidden" id="hsms">
        <div class="weui_cell_hd"><label class="weui_label">验证码<span>*</span></label></div>
        <div class="weui_cell_bd weui_cell_primary">
            <input class="weui_input" id="sms" name="sms" type="tel" placeholder="请输入验证码">
        </div>
		<div class="weui_cell_ft" style="margin:0;">
        <input type="button" id="sendsms" class="weui_btn weui_btn_mini weui_btn_primary" value="获取验证码">
		</div>
    </div>
	{/if}
</div>
{/if}
	
<div class="weui_cells_form">
				{loop $ds $fields}
				
		{if $fields['type'] == 'text'}
	<div class="weui_cell">
		<div class="weui_cell_hd"><label class="weui_label">{$fields['title']}{if $fields['essential']}<span>*</span>{/if}</label></div>
		<div class="weui_cell_bd weui_cell_primary">
		{if $fields['bind'] == 'birth'}
			<input class="weui_input" name="field_{$fields['refid']}_{$fields['bind']}" type="text" value="{$profile['birthyear']}-{$profile['birthmonth']}-{$profile['birthday']}" placeholder="{$fields['tixing']}" {if $fields['essential']}required{/if}>
		{else}
			<input class="weui_input" name="field_{$fields['refid']}_{$fields['bind']}" type="text" value="{$fields['default']}{$profile[$fields['bind']]}" placeholder="{$fields['tixing']}" {if $fields['only']}id="n_{$fields['refid']}" onblur="check(this,'{$fields['refid']}')" data="{$fields['title']}"{/if} {if $fields['essential']}required{/if}>
		{/if}
		</div>
		<div class="weui_cell_ft"></div>
	</div>
		{/if}
		
		{if $fields['type'] == 'email'}
	<div class="weui_cell">
		<div class="weui_cell_hd"><label class="weui_label">{$fields['title']}{if $fields['essential']}<span>*</span>{/if}</label></div>
		<div class="weui_cell_bd weui_cell_primary">
			<input class="weui_input" type="text" name="field_{$fields['refid']}_{$fields['bind']}" value="{$fields['default']}" placeholder="{$fields['tixing']}" {if $fields['essential']}required{/if}>
		</div>
	</div>
		{/if}
				
		{if $fields['type'] == 'number'}
	<div class="weui_cell">
		<div class="weui_cell_hd"><label class="weui_label">{$fields['title']}{if $fields['essential']}<span>*</span>{/if}</label></div>
		<div class="weui_cell_bd weui_cell_primary">
			<input class="weui_input" type="number" name="field_{$fields['refid']}_{$fields['bind']}" value="{$fields['default']}" pattern="[0-9]*" placeholder="{$fields['tixing']}">
		</div>
	</div>
		{/if}
				
		{if $fields['type'] == 'textarea'}
        <div class="weui_cell">
            <div class="weui_cell_bd weui_cell_primary">
			<textarea class="weui_textarea" name="field_{$fields['refid']}_{$fields['bind']}" rows="3" placeholder="{$fields['tixing']}">{$fields['default']}</textarea>
                <div class="weui_textarea_counter"><span id='textarea_num'>限200字</span></div>
            </div>
        </div>
          <script>
$(function(){
	$(".weui_textarea").on("input paste" , function(){
				var num_left=$(this).val().length;
				if((200-num_left)<0){
					$("#textarea_num").text("超出"+(num_left-200)+"字");
					$("#textarea_num").css("color","#E44443");
				}else{
					$("#textarea_num").text((num_left)+"字");
					$("#textarea_num").css("color","#999999");
				}
			});

})
</script> 
		{/if}
				
		{if $fields['type'] == 'radio'}
		<div class="weui_cell">
			<div class="weui_cell_hd"><label for="name" class="weui_label">{$fields['title']}{if $fields['essential']}<span>*</span>{/if}</label></div>
				<div class="weui_cell_bd weui_cell_primary">
					<input type="text" class="weui_input" id="{$fields['refid']}" name="field_{$fields['refid']}_{$fields['bind']}" placeholder="{$fields['tixing']}" value="">
				</div>
				<div class="weui_cell_ft"></div>
		</div>
    <script>
      $("#{$fields['refid']}").select({
        title: "{$fields['title']}",
        items: [
		{loop $fields['options'] $v}
		"{$v}",
		{/loop}
        ],
        onChange: function(d) {
		console.log(this, d);
        }
      });
    </script>
		{/if}
				
		{if $fields['type'] == 'checkbox'}		
		<div class="weui_cell">
			<div class="weui_cell_hd"><label for="name" class="weui_label">{$fields['title']}{if $fields['essential']}<span>*</span>{/if}</label></div>
				<div class="weui_cell_bd weui_cell_primary">
					<input type="text" class="weui_input" id="{$fields['refid']}" name="field_{$fields['refid']}_{$fields['bind']}" placeholder="{$fields['tixing']}" value="">
				</div>
		</div>
    <script>
      $("#{$fields['refid']}").select({
        title: "{$fields['title']}",
        multi: true,
        items: [
		{loop $fields['options'] $v}
			{
				title: "{$v}",
				value: "{$v}"
			},
		{/loop}
        ],
        onChange: function(d) {
		console.log(this, d);
        }
      });
    </script>
		{/if}
						
		{if $fields['type'] == 'select'}
		
      <div class="weui_cell">
        <div class="weui_cell_hd"><label for="date" class="weui_label">{$fields['title']}{if $fields['essential']}<span>*</span>{/if}：</label></div>
        <div class="weui_cell_bd weui_cell_primary">
          <input type="text" class="weui_input" id="{$fields['refid']}" name="field_{$fields['refid']}_{$fields['bind']}" placeholder="{$fields['tixing']}" value="">
        </div>
      </div>
		    <script>
		{php $c=end(array_keys($fields['options']));}
      $("#{$fields['refid']}").picker({
        title: "请选择{$fields['title']}",
        cols: [
          {
            textAlign: 'center',
            values: [
		{loop $fields['options'] $like $v}
		'{$v}'{if $like!=$c},{/if}
		{/loop}
			]
          }
        ]
      });
    </script>
		{/if}

		{if $fields['type'] == 'image'}
</div>

    <div class="weui_cells_form">
        <div class="weui_cell">
            <div class="weui_cell_bd weui_cell_primary">
                <div class="weui_uploader">
                    <div class="weui_uploader_bd up_border" id="{$fields['refid']}" style="">
                        <ul class="weui_uploader_files">   
                            <input type="hidden" name="field_{$fields['refid']}_{$fields['bind']}" accept="image/*" capture="camera" value="" />                        
                            <image class="img-resp weui_uploader_status" id="show{$fields['refid']}" src="{php echo tomedia($fields['image'])}" />
                        </ul>
                    </div>
					<div class="a_border"></div>
                </div>
            </div>
        </div>
    </div>
<script>
          var btn = document.getElementById('{$fields['refid']}');
          //定义images用来保存选择的本地图片ID，和上传后的服务器图片ID
          var images = {
              localId: [],
              serverId: []
          };


//	document.querySelector('#show{$fields['refid']}').onclick = function () {
//		wx.previewImage({
//			urls: ['{php echo tomedia($fields['image'])}',images.serverId]
//		});
//	};
          btn.onclick = function(){
              wx.chooseImage({
					count: 1,
					sourceType: ['album', 'camera'],
					success:function(res){

                        images.localId = res.localIds;
                        var i = 0, length = images.localId.length;

                        document.getElementById('show{$fields['refid']}').src = images.localId;
					var wxUpload = function() {
                        wx.uploadImage({
                            localId: images.localId[i], // 需要上传的图片的本地ID，由chooseImage接口获得
                            isShowProgressTips: 1, // 默认为1，显示进度提示
                            success: function (res) {
                                i++;
                                //将上传成功后的serverId保存到serverid
                                images.serverId.push(res.serverId);
                                //(serverId 即 media_id,公众号此后可根据该media_id来获取多媒体)将上传的图片通过AJAX远程提交给php下载到本地服务器
								var url = "{php echo $this->createMobileUrl('uploads',array('type'=>'image'));}&serverId=" + res.serverId + "&localId=" + i;
								$.post(url, function(dat){
								var dat = eval("("+dat+")");
									if (dat.status == 'success') {
										$.toast(dat.message, "success");
										$('input[name="field_{$fields['refid']}_{$fields['bind']}"]').val(dat.path);
									}else{
										$.toast(dat.message, "cancel");
										document.getElementById('show{$fields['refid']}').src = "";
									}
								});
                                if(i < length){
                                    wxUpload();
                                }
                            },
							fail: function (res) {
								alert(JSON.stringify(res));
							}
                        });
						
					};
					wxUpload();

                   }
              });
  
          }
</script>
<div class="weui_cells weui_cells_form">
		{/if}
		
		{if $fields['type'] == 'calendar'}
		<div class="weui_cell">
			<div class="weui_cell_hd"><label for="" class="weui_label">{$fields['title']}{if $fields['essential']}<span>*</span>{/if}</label></div>
				<div class="weui_cell_bd weui_cell_primary">
				{if $fields['bind'] == 'birth'}
					<input class="weui_input" name="field_{$fields['refid']}_{$fields['bind']}" type="text" value="{$profile['birthyear']}-{$profile['birthmonth']}-{$profile['birthday']}" placeholder="{$fields['tixing']}" id="{$fields['refid']}">
		<script>
			$("#{$fields['refid']}").datetimePicker({title:"选择{$fields['title']}",m:1});
		</script>
				{else}
					<input class="weui_input" name="field_{$fields['refid']}_{$fields['bind']}" type="text" value="" placeholder="{$fields['tixing']}" id="{$fields['refid']}">
		<script>
			$("#{$fields['refid']}").datetimePicker({title:"选择{$fields['title']}",m:1});
		</script>
				{/if}
				</div>
		</div>
		{/if}
		
		{if $fields['type'] == 'range'}
		<div class="weui_cell">
			<div class="weui_cell_hd"><label for="" class="weui_label">{$fields['title']}{if $fields['essential']}<span>*</span>{/if}</label></div>
				<div class="weui_cell_bd weui_cell_primary">
					<input class="weui_input" type="text" name="field_{$fields['refid']}_{$fields['bind']}" value="" placeholder="{$fields['tixing']}" id="{$fields['refid']}" />
				</div>              
		</div>
    <script>
      $("#{$fields['refid']}").datetimePicker();
    </script>
		{/if}
		
		{if $fields['type'] == 'reside'}
		<div class="weui_cell">
			<div class="weui_cell_hd"><label for="" class="weui_label">{$fields['title']}{if $fields['essential']}<span>*</span>{/if}</label></div>
				<div class="weui_cell_bd weui_cell_primary">
					<input class="weui_input" type="text" name="field_{$fields['refid']}_{$fields['bind']}" value="" placeholder="{$fields['tixing']}" id="{$fields['refid']}"/>
				</div>
		</div>
    <script>
	$("#{$fields['refid']}").cityPicker({
		title: "{$fields['title']}"
	});
    </script>
		{/if}
		
				{/loop}
</div>
{if $activity['isvoice']==1}
<div class="weui_cells weui_cells_form voice">
	<div class="weui_cells_title tright"><span class="left">{$activity['voice']}{if $activity['ivoice']==1}<span class="f-red">*</span>{/if}</span><span class="f12">{$activity['voicedec']}</span></div>	
	<div class="weui_cell">
		<div class="weui_cell_hd">		
			<div class="record-start-btn iconfont f35 f-white left" id="record-start">&#xe62a;</div>
			<div class="record-stop-btn iconfont f35 f-white left" id="record-stop">&#xe62a;</div>
			<div class="record-time f-orange f12 right"></div>
			<div class="record-prompt f-orange f12 middle right"><span class="block f-blue">蓝色开始录音</span><span class="block f-red">红色停止录音</span></div>
			<input type="hidden" name="voice" id="showvoice" value="" />
		</div>
		<div class="weui_cell_bd weui_cell_primary">
			<div class="send-control right">
				<div class="send-record-btn" id="send-record-btn">上传录音</div>
				<div class="send-success weui_btn_disabled" id="send-success" style="display:none;">上传成功</div>
			</div>
		</div>
	</div>	
</div>
<script>
    var upload_url='{php echo $_W['siteroot'].'app/'.$this->createMobileUrl('uploadvoice',array());}';
    var getprefop_url='{php echo $_W['siteroot'].'app/'.$this->createMobileUrl('getprefop',array());}';
          var btn = document.getElementById('send-record-btn');
		  
  //        btn.onclick = function(){
		var localId = null;
		var serverId = null;
        var timer = null;
        var timerTime = 0;
		
		$(".record-start-btn").click(function () {
            $(".record-start-btn").hide();
            $(".record-stop-btn").show();
            $(".record-prompt").hide();
            timerTime = 0;
            $(".record-time").text("");
            timer = setInterval(function () {
                timerTime++;
                $(".record-time").text("时长:" + timerTime + "秒");
				if (timerTime >58) {
					wx.stopRecord({
						success: function (res) {
							localId = res.localId;
							recordComplete();
						},
						fail: function (res) {
							alert(JSON.stringify(res));
						}
					});
				}
            }, 1000);
//			wx.startRecord();
			wx.startRecord({
				cancel: function () {
					alert('您拒绝了授权录音');
				}
			});
            wx.onVoiceRecordEnd({
                // 录音时间超过一分钟没有停止的时候会执行 complete 回调
                complete: function (res) {
                    localId = res.localId;
                    recordComplete();
					alert('录音时间已超过一分钟');
                }
            });
        });
        $(".record-stop-btn").mouseup(function () {
            wx.stopRecord({
                success: function (res) {
                    localId = res.localId;
                    recordComplete();
//						document.getElementById('showvoice').value = localId;
					$('#send-record-btn').css('display','');
					$('#send-success').css('display','none');
                },
				fail: function (res) {
					alert(JSON.stringify(res));
				}
            });
        });
        function recordComplete() {
            wx.playVoice({
                localId: localId // 需要播放的音频的本地ID，由stopRecord接口获得
            });
            clearInterval(timer);
            $(".record-stop-btn").hide();
            $(".record-start-btn").show();
            $(".send-control").show();
        }

		$(".send-record-btn").click(function () {
            if (localId == null)
                return;
            wx.uploadVoice({
                localId: localId, // 需要上传的音频的本地ID，由stopRecord接口获得
                serverId: serverId,
                isShowProgressTips: 1, // 默认为1，显示进度提示
                success: function (res) {
				
                $.ajax({
                  type: 'POST',
                  url: upload_url,
                  data:{serverId:res.serverId},
                  timeout: 15000,
                  success: function(res){
                    if (/^qiniu-persistentId.*$/.test(res)) {
                        var tmp=res.split(':');
                        setInterval(function () {
                            $.ajax({
                                type: 'POST',
                                url: getprefop_url,
                                data:{persistentId:tmp[1]},
                                success: function(res) {
                                    if (res == 1) location.href =tmp[2];
                                },
                                fail: function(err) {
                                    alert(JSON.stringify(err));
                                }
                            });
                        },1000);
                    }else{
                    }
                  },
                  fail: function(err) {
                      alert(JSON.stringify(err));
                  }
                });
//				alert('上传语音成功，serverId 为' + res.serverId);
					serverId = res.serverId; // 返回音频的服务器端ID
					document.getElementById('showvoice').value = "dayu_form_{$_W['uniacid']}_"+serverId+".mp3";
					$('#send-record-btn').css('display','none');
					$('#send-success').css('display','');
                },
				fail:function() {
					alert(JSON.stringify(res));
				}
            });
		});
</script>
{/if}
{if $activity['paixu']==1}
<div class="weui_cells weui_cells_form">
    <div class="weui_cell">
        <div class="weui_cell_hd"><label class="weui_label">{$activity['member']}<span>*</span></label></div>
        <div class="weui_cell_bd weui_cell_primary">
            <input class="weui_input" id="member" name="member" type="text" value="{$member['realname']}" placeholder="请输入姓名">
        </div>
    </div>
    <div class="weui_cell">
		<div class="weui_cell_hd"><label class="weui_label">{$activity['phone']}<span>*</span></label></div>
        <div class="weui_cell_bd weui_cell_primary ">
            <input class="weui_input" id="mobile" name="mobile" type="tel" pattern="[0-9]*" value="{$member['mobile']}" placeholder="请输入手机号">
        </div>
    </div>
	{if $activity['smsid']!=0}
    <div class="weui_cell">
		<input type="hidden" id="htel">
		<input type="hidden" id="hsms">
        <div class="weui_cell_hd"><label class="weui_label">验证码<span>*</span></label></div>
        <div class="weui_cell_bd weui_cell_primary">
            <input class="weui_input" id="sms" name="sms" type="tel" placeholder="请输入验证码">
        </div>
		<div class="weui_cell_ft" style="margin:0;">
        <input type="button" id="sendsms" class="weui_btn weui_btn_mini weui_btn_primary" value="获取验证码">
		</div>
    </div>
	{/if}
</div>
{/if}
	
    <div class="weui_btn_area row">
	{if !empty($activity['agreement'])}
		<div class="weui_cells_checkbox">
			<label class="weui_cell weui_check_label" for="agreement">
				<div class="weui_cell_hd">
					<input type="checkbox" name="agreement" class="weui_check" id="agreement">
					<i class="weui_icon_checked"></i>
				</div>
				<div class="weui_cell_bd weui_cell_primary f14">
					<p>我已阅读并同意<a href="javascript:;" class="open-popup" data-target="#popup">《{$activity['agreement']}》</a></p>
				</div>
			</label>
		</div>
	{/if}
		
    <div style="box-sizing: border-box; margin: 0px auto; padding: 5px; border: 0px; vertical-align: baseline; -webkit-tap-highlight-color: transparent; outline: none; width: 60%; line-height: 1.25rem; display: block; text-align: center; border-radius: 25px;background-image: -webkit-linear-gradient(left, rgb(245, 224, 156), rgb(226, 181, 74), rgb(245, 224, 156)); background-attachment: initial; background-size: initial; background-origin: initial; background-clip: initial; background-position: initial; background-repeat: initial;">
		{if !empty($par['var1'])}<input type="hidden" name="{$par['var1']}" value="{$_GPC[$par['var1']]}">{/if}
		{if !empty($par['var2'])}<input type="hidden" name="{$par['var2']}" value="{$_GPC[$par['var2']]}">{/if}
		{if !empty($par['var3'])}<input type="hidden" name="{$par['var3']}" value="{$_GPC[$par['var3']]}">{/if}
		<input type="hidden" name="token" value="{$_W['token']}" />
	<button style="color:#8a5000;box-sizing: border-box; margin: 0px; padding: 0px; border: 0px; font-size: 20px; vertical-align: baseline; width: 100%; height: 36px; line-height: 1rem; display: block; border-radius: 18px; background-image: -webkit-linear-gradient(left, rgb(226, 181, 74), rgb(245, 224, 156), rgb(226, 181, 74)); background-attachment: initial; background-size: initial; background-origin: initial; background-clip: initial; background-position: initial; background-repeat: initial;">{$submitname}</button>
	</div>
    </div>
</form>
    <div class="weui_cells_form">
        <div class="weui_cell">
            <div class="weui_cell_bd weui_cell_primary">
                <div class="weui_uploader">
                    <div class="weui_uploader_bd up_border" style="height:150px;background-image: url({MODULE_URL}template/weui/images/pg/mingdan_title.png);background-position: 5px 0;background-repeat: no-repeat;background-size: 38px auto;">
						<div id="colee" style="overflow:hidden;height:150px;width:auto;margin-left:50px;">
                        <div id="colee1">
                        <div class="new-comment-content">						
						<p style="upt"></p>
						{$activity['description']}
						<p style="upt"></p>
                        </div>
                        </div>
						<div id="colee2"></div>
                    </div>
                </div>
					<div class="a_border" style="height:145px;"></div>
            </div>
        </div>
    </div>
</div>
<script>
var speed=30;
var colee2=document.getElementById("colee2");
var colee1=document.getElementById("colee1");
var colee=document.getElementById("colee");
colee2.innerHTML=colee1.innerHTML; //克隆colee1为colee2
function Marquee1(){
//当滚动至colee1与colee2交界时
if(colee2.offsetTop-colee.scrollTop<=0){
 colee.scrollTop-=colee1.offsetHeight; //colee跳到最顶端
 }else{
 colee.scrollTop++
}
}
var MyMar1=setInterval(Marquee1,speed)//设置定时器
//鼠标移上时清除定时器达到滚动停止的目的
colee.onmouseover=function() {clearInterval(MyMar1)}
//鼠标移开时重设定时器
colee.onmouseout=function(){MyMar1=setInterval(Marquee1,speed)}
</script>
	{template 'insert/script'}
{template 'footers'}